/***
 * 测试使用antd mobile UI组件库
 *
 *
 */
import React, { Component } from 'react'
import { Button, ImageViewer } from 'antd-mobile'
import kaola from './assets/images/kaola.webp'
export default class App extends Component {
  render() {
    return (
      <div>
        <Button
          onClick={() => {
            alert('hello.')
          }}
        >
          Default
        </Button>
        <Button color="primary">Primary</Button>
        <Button color="success">Success</Button>
        <Button color="danger">Danger</Button>
        <Button color="warning">Warning</Button>
        <Button
          onClick={() => {
            const handler = ImageViewer.show({
              image: kaola
            })
            setTimeout(() => {
              handler.close()
            }, 3000)
          }}
        >
          显示图片并在3秒后关闭
        </Button>
      </div>
    )
  }
}
